package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.Tbstaff;

public interface IJlTbstaffDAO extends CrudRepository<Tbstaff, Long> {
	//查找排班表中的员工编号 
		@Query("select s from Tbstaff s where s.staffNo=?1")
		public List<Tbstaff>  useFindNameTbstaff(long staffNo);
		@Query("select s from Tbstaff s where s.staffNo=?1")
		public List<Tbstaff>  useygidToTbstaff(long staffNo);
		@Query("select s from Tbstaff s where s.departmentNo=?1")
		public List<Tbstaff>  bmidToTbstaff(BigDecimal departmentNo);
		@Query("select s from Tbstaff s where s.staffName=?1")
		public List<Tbstaff>  useygnameToTbstaff(String staffName);
		@Query("select s from Tbstaff s ")
		public List<Tbstaff> finTbstaffpageing(Pageable pageable);
		@Query("select s from Tbstaff s ")
		public List<Tbstaff> finTbstaff();
		@Query("select s from Tbstaff s where staffNo=?1")
		public List<Tbstaff> idToTbstaff(Long staffNo);
}
